<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <h3>{{ xxx }}</h3>
    <input type="text" v-model="inputValue" />
    <button @click="btnClick">我要触发父方法</button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  props: ['msg', 'xxx'],
  data () {
    return {
      inputValue: ''
    }
  },
  methods: {
    btnClick () {
      this.xxx.a = Math.random() * 999
      // this.$emit('sonFun', this.inputValue)
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped></style>
